<template>
  <div class="tabs-container">
    <slot v-if="show"></slot>
  </div>
</template>

<script>
  export default {
    data() {
      return {
        show: true
      }
    },

    props: {
      title: {type: String, required: true}
    },

    events: {
      /**
       * @desc tab change event process.
       * @param labelName {String} tabs label name.
       */
      tabChange (labelName) {
        this.show = this.title === labelName;
      }
    },

    ready () {
      this.$dispatch('tabsInit', this.title);
    }
  }
</script>

